<html>
  <head>
    <link type="text/css" rel="stylesheet" href="stylesheets/sma.css" />
  </head>
  <body>
    <center>
    <h1>ORUUC</h1>
    <h2>Shared Ministry Agreements</h2>
    <h3>Groups</h3>
    <p>Logged in as {{user.nickname()}}</p>
    <a href="/respond">Start a Shared Ministry Agreement for a new
    group</a>

    <p>

    <table width="80%" class="simple"><tr>
        <th class="simple" width="5%">View
        <th class="simple" width="5%">Edit
        <th class="simple" width="5%">Hide
        {% if admin %}
        <th class="simple" width="5%">Delete
        {% endif %}
        <th class="simple">Group Name
        <th class="simple">Last Updated
        <th class="simple">By
      {% for group in groups %}
      </tr><tr>
        <td class="simple"><a href="view/{{group.key().id()}}">View</a>
        <td class="simple"><a href="respond/{{group.key().id()}}">Edit</a>
        <td class="simple"><a href="hide/{{group.key().id()}}">Hide</a>
        {% if admin %}
        <td class="simple"><a href="delete/{{group.key().id()}}">Delete</a>
        {% endif %}
        <td class="simple">{{group.sma_name}}
        <td class="simple">{{group.sma_updated.strftime(dt_format)}}
        <td class="simple">{{group.sma_updater.nickname()}}
      {% endfor %}
    </tr></table>

    <p><a href="{{logout}}">Logout</a>
    {% if admin %}
    <p><a href="/person">person list</a> 
    {% endif %}
    </center>

    <!-- <a href="/debug">Debug</a> -->
  </body>
</html>
